package com.changgou.entity.exception;

/**
 * Created by 柱子 on 2020/10/16 11:16   封装错误的消息提示枚举
 */
public enum EResultCode {
    ADMIN_NOT_EXIST(false,0001,"账户民不存在"),
    DATA_NOT_EXIST(false, 1001, "查询数据不存在"),
    DATA_ADD_EXIST(false, 1002, "添加数据失败"),
    DATA_DElETE_EXIST(false, 1003, "删除数据失败"),
    DATA_SELECT_EXIST(false, 1004, "查询失败，请重新查询添加条件"),
    DATA_AND_DElETE(false, 1005, "当前商品已经删除"),
    DATA_STATUS_EXIST(false, 1006, "当前商品未经过审核"),
    DATA_STATUS_NOT(false, 1007, "请先下架商品"),
    DATA_MARKETABLE_YES(false, 1006, "商品正处于上架状态"),


    FEIGN_DATA_NO(false,2001,"当前没有数据被查询到，无法导入索引库")
    ;


    private boolean flag;      //false
    private int code;          //响应状态码
    private String message;    //响应状态消息

    EResultCode(boolean flag, int code, String message) {
        this.flag = flag;
        this.code = code;
        this.message = message;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
